package com.chuxing.security.config;

import com.chuxing.security.interceptor.IpLimuitInterceptor;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author LiuQi
 * @create 2024-12-25-17:19
 */
@Configuration
@RequiredArgsConstructor
public class WebConfig implements WebMvcConfigurer {
    private final IpLimuitInterceptor ipLimuitInterceptor;

    /**
     * 添加拦截器
     */
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        // 添加拦截器
//        registry.addInterceptor(ipLimuitInterceptor).addPathPatterns("/**");
    }
}
